<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>

<body>
    <div id="app">
        <!-- <h1 v-if='flag'>我是一个h1标签  </h1> -->
        <h1 v-show='flag'>我是一个h1标签 </h1>
        <button @click='show1'>点击切换</button>
        <button @click='btn2'>点击改变成绩 </button>


        <div v-if="score>=90">
            <h1>很优秀 大于90</h1>
        </div>

        <div v-else-if="score>=80 && score < 90">
            <h1>比较优秀 </h1>
        </div>

        <div v-else-if="score>=60 && score < 80">
            <h1>一般般 </h1>
        </div>

        <div v-else >
            <h1>不及格 </h1>
        </div>

            <!-- 推荐写法  -->

        <div v-if="score>=90">
            <h1>很优秀 大于90</h1>
        </div>

        <div v-if="score>=80 && score < 90">
            <h1>比较优秀 </h1>
        </div>

        <div v-if="score>=60 && score < 80">
            <h1>一般般 </h1>
        </div>

        <div v-if="score<60" >
            <h1>不及格 </h1>
        </div>




    </div>


    <script>

        var app = new Vue({
            el: '#app',
            data: {
                message: 'Hello Vue22222!',
                flag: true,
                score: 90
            },
            methods: {
                show1() {
                    this.flag = !this.flag
                },
                btn2() {
                    this.score--
                }
            }
        })

        console.log('app', app)

    </script>
</body>

</html>